package demo013;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class Dog implements Doginface{
    @Override
    public void App() {
        System.out.println("@component");
    }

}
@Component
class Ass{
    public Ass() {
        System.out.println("测试无参构造");
    }

    @PostConstruct
    public void Post(){
        System.out.println("初始化");
    }
    public void Yee(){
        System.out.println("业务调用");
    }
    @PreDestroy
    public void PreDestory(){
        System.out.println("销毁方法");
    }
}